package demo.service;

import demo.domain.DemoAddress;
import demo.domain.dao.DemoAddressDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by lliu on 2015/11/7.
 */
@Service
public class DemoAddressServiceImpl implements DemoAddressService {

    @Autowired
    private DemoAddressDao demoAddressDao;

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    @Override
    public void editDemoAddress(DemoAddress demoAddress) {
        demoAddressDao.update(demoAddress);
    }
}
